All Questions
8 questions
1vote
1answer
973views
Method that remove duplicates from a list of words in Java [closed]
Today, I took a coding challenge with this question: Given a List of Strings, write a method removeDuplicates that removes duplicate words from the List and returns an ArrayList of all the unique ...
2votes
1answer
1kviews
Generate the alphabet and select only specific letters
I am learning java and would like to create a very simple application but which uses SOLID principles. The required functionality is: generate the alphabet with a possibility to select specific ...
3votes
2answers
187views
Let me fix thou number
Problem Statement: Write a program that cleans up user-entered phone numbers so that they can be sent SMS messages. The rules are as follows: If the phone number is less than 10 ...
17votes
5answers
2kviews
Generating Robot Name
Problem: Write a program that manages robot factory settings. When robots come off the factory floor, they have no name. The first time you boot them up, a random name is generated, such ...
25votes
3answers
4kviews
What does the Bob say?
Description: Bob is a lackadaisical teenager. In conversation, his responses are very limited. Bob answers 'Sure.' if you ask him a question. He answers 'Whoa, chill out!' if you yell at ...
5votes
2answers
7kviews
Search word in multiple files
I am writing a brute-force method to search for a word. Please review my code and tell me how I can improve it. ...
2votes
2answers
106views
Returning a different but similar "increasing" string depending on instance argument
I have to work with a function that takes an instance of a class as an input, and depending on that instance, I have to return a specific string. It works, but it has a lot of repetitive code. How can ...
-2votes
2answers
674views
Manipulating strings and character positions
Write a program that manipulates two strings. The program inputs two strings (string1 and string2) and a character (...